<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
		<title></title>
		<script type="text/javascript">
			var names = new Array(3);
			names[0] = "bbb";
			names[1] = "aaa";
			names[2] = "ccc";
			var s = names.sort().reverse().join("$");
			alert(s);
			for(var i=0;i<names.length;i++){
				document.write(names[i]+"$");
			}
			
			var names1 = new Array("ddd","zzz","kkk");
			
			for (var name in names1) {
				document.write("<br/>"+names1[name]+"$");
			}
			//json
			var names2 = ["eee",true,null,10];
			for (var name in names2) {
				document.write("<br/>"+names2[name]+"$");
			}
			
			
			
		</script>
	</head>

	<body>

	</body>

</html>